package metier.Service;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

import metier.entities.Devise;
import metier.entities.categorie;
import metier.sess.ICategorieLocal;
import metier.sess.IDeviseLocal;


@Stateless
@WebService
public class DeviseService {
	
	@EJB(beanName="DEV")
	private IDeviseLocal metier;
	
	
	@WebMethod
	public void addDevise(@WebParam(name="Intitule")String Initule,@WebParam(name="statut")boolean Statut)
	{
	/*	Devise d=new Devise(Initule,Statut);
		metier.addDevise(d);;*/
	}
	

	@WebMethod
	public List<Devise> listDevise()
	{
		return metier.getAllDevises();
	}
	
	
	@WebMethod 
	public Devise getDevise(@WebParam(name="Id")Integer Id)
	{
		return metier.getDevise(Id);
	}
	
	
	@WebMethod
	public void UpdateDevise(@WebParam(name="Id")Integer Id,@WebParam(name="Intitule")String Intitule,@WebParam(name="Statut")boolean statut)
	{
	/*
		Devise d=metier.getDevise(Id);
		d.setIntitule(Intitule);
		d.setStatut(statut);
		metier.updateDevise(d);*/
		
	}
	
	@WebMethod
	public void DeleteDevise(@WebParam(name="Id")Integer Id)
	{
		metier.deleteDevise(Id);
	}
	
	

}
